package com.mvc.service.impl;

import com.mvc.dao.StudentDao;
import com.mvc.dao.impl.StudentDaoImpl;
import com.mvc.entity.Student;
import com.mvc.service.StudentService;

/**
 * @author wzm
 * @create 2023-02-27 15:30
 */
//Service接口的实现类 具体实现业务逻辑的功能
public class StudentServiceImpl implements StudentService {
    //创建底层Dao的对象 通过dao对象来完成功能
    private StudentDao studentDao = new StudentDaoImpl();

    @Override
    public boolean register(Student student) {
        //判断dao返回的受影响行数是否 > 0
     return studentDao.insertStudent(student) > 0;
    }
}
